<?php
session_start();
$ip = $_SERVER["REMOTE_ADDR"];
$time = time();
/*$mysqli = new mysqli('localhost', 'root', '', 'bbs_0');
if ($mysqli->connect_error) {
    die('数据库链接错误 (' . $mysqli->connect_errno . ') '
        . $mysqli->connect_error);
}
$mysqli->set_charset('utf8');*/
//return $mysqli;

$conn = mysqli_connect("localhost", "root", "", "bbs_0") or die("数据库链接错误");
// mysqli_select_db($conn, "bbs_0");
// 字符转换，读库
mysqli_query($conn, "set character set 'utf8'");
// 写库
mysqli_query($conn, "set names 'utf8'"); // 使用utf-8中文编码;
//$pagesize = 3;
